<!DOCTYPE>
<html>
<head>
<meta charset="utf-8" />
<title>无标题文档</title>
</head>

<body>
	<div id="div">
		<img id="date01" src="img/0.png" />
		<img id="date02" src="img/8.png" />
		时
		<img id="date03" src="img/1.png" />
		<img id="date04" src="img/5.png" />
		分
		<img id="date05" src="img/0.png" />
		<img id="date06" src="img/9.png" />
		秒
	</div>
</body>
<script>
	
	
	function showtime(){
		var d = new Date();
		var hours = d.getHours()<10 ? "0"+d.getHours() : d.getHours();
		var mins = d.getMinutes()<10 ? "0"+d.getMinutes() : d.getMinutes();
		
		var secs = d.getSeconds();
		
		var img01 = document.getElementById("date01");
		var img02 = document.getElementById("date02");
		var img03 = document.getElementById("date03");
		var img04 = document.getElementById("date04");
		var img05 = document.getElementById("date05");
		var img06 = document.getElementById("date06");
		
		img01.src = "img/"+hours.toString()[0]+".png";
		img02.src = "img/"+hours.toString()[1]+".png";
		img03.src = "img/"+mins.toString()[0]+".png";
		img04.src = "img/"+mins.toString()[1]+".png";
		
		img05.src = "img/"+parseInt(secs/10)+".png";
		img06.src = "img/"+secs%10+".png";
	}
	
	setInterval(showtime,1000);
</script>
</html>
